package org.sky.lintCode.start;

import java.util.LinkedList;
import java.util.Scanner;

/**
 * 字符串反转
 *
 * @author fog
 * @date 2021/11/14
 */

public class StringReverse {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        LinkedList linkedList=new LinkedList();

        char[] chars = str.toCharArray();

        for (int i = chars.length - 1; i >= 0; i--) {
            linkedList.add(chars[i]);
        }

        for (int j = 0; j < linkedList.size(); j++) {
            System.out.print(linkedList.get(j));
        }

    }

}
